#include "mainwindow.h"
#include <QApplication>
#include <QMessageBox>
#include <QFile>

#include "consts.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    QFile lesson_file(kLessonFileName.c_str());
    if (!lesson_file.exists()) {
        QMessageBox::information(&w, "Lesson File Not Exists !", "Please create file named lesson.txt in the same folder and input your lessons like this : \n\n"
                                                                 "Math \n"
                                                                 "Chinese \n"
                                                                 "Computer \n"
                                                                 "Civil Engineering \n ...others...");
        return -1;
    }

    return a.exec();
}
